package cn.lu.train.mvp.model;



public class DataModelManager {

    @SuppressWarnings("unchecked")
    public static <T extends BaseModel> T create(Class<T> clazz){

        try {
            return (T) Class.forName(clazz.getName()).newInstance();
        } catch (InstantiationException e) {
            e.printStackTrace();
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }

        return null;
    }
}
